import java.util.function.Consumer;
import java.util.function.Function;
import java.util.function.Predicate;
import java.util.function.Supplier;

public class LambdaPratice {
    public static void main(String[] args) {
        Consumer<Integer> consumer = x-> System.out.println("Consumer");
        consumer.accept(2);
        Supplier<Integer> supplier = ()->5;
        System.out.println(supplier.get());
        Function<Integer,Integer> function = x->x*x;
        System.out.println(function.apply(8));
        Predicate<Integer> predicate = x->{if (x==20)return true;else return false;};
        System.out.println(predicate.test(20));
    }
}
